import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import reportWebVitals from './reportWebVitals';
import PubSub from 'pubsub-js'
import { registerMicroApps, start } from 'qiankun';

window.PubSub = PubSub
//tinper-bee 组件库 css 引用

// ReactDOM.render(
//   <React.StrictMode>
//     <App />
//   </React.StrictMode>,
//   document.getElementById('root')
// );
// ReactDOM.render(
//   <App />
// ,
//   document.getElementById('root')
// );
// 使用ReactDOM.createRoot方法挂载 react应用  useTransition 方法才能生效,才能让react内部控制渲染暂停
ReactDOM.createRoot(document.getElementById('root')).render(<App/>)

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();



// registerMicroApps([
//   {
//     name: 'react app', // app name registered
//     entry: '//localhost:3000',
//     container: '#root',
//     activeRule: '/yourActiveRule',
//   },
//   {
//     name: 'vue app',
//     // entry: { scripts: ['//127.0.0.1:5500/#/assets/index-de3a975a.js.js'] },
//     entry: '//localhost:8080/#/', // 能加载，但页面没有打开
//     container: '#root',
//     activeRule: '/yourActiveRule2',
//   },
// ]);

// start();


